import java.util.Random;

public class test11 {
    public static void main(String[] args) {

        Random rand = new Random();
        int[] arr = new int[10];
        for(int i=0;i<arr.length;i++){
            int a=rand.nextInt(100)+1;
            arr[i]=a;
        }
        int sum=0;
        for(int i=0;i<arr.length;i++){
            sum+=arr[i];
        }
        System.out.println("数组之和"+sum);
        int avg=sum/arr.length;
        System.out.println("数组的平均数"+avg);
        int count=0;
        for(int i=0;i<arr.length;i++){
            if(avg>arr[i]){
                count++;
            }

        }
        System.out.println("共有"+count);
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
    }
}
